<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
        <title>init</title>
    </head>
    <body style="margin:0;padding:0;">
    	<header id='header' style="background-color: #0EAAE3;">
				
		</header>
        <div id="laodnow" style="background-image: url(image/loadingnow.gif);background-color:#BAE0F0;background-size: 100%;height:100%;background-repeat:no-repeat;background-position: center;"></div>
    </body>
</html>
<script type="text/javascript" src="script/api.js"></script>
<script type="text/javascript" src="script/framework7.js"></script>
<script type="text/javascript" src="script/toast.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="script/init.js"></script>
<script type="text/javascript" src="script/platform/p_init.js"></script>
<script type="text/javascript" src="script/platform/p_androidreturn.js"></script>
<script type="text/javascript" src="script/platform/p_bmap.js"></script>
<script>
    apiready = function() {
        var header = $api.byId('header');
        $api.fixIos7Bar(header);
        var headerPos = $api.offset(header);
        api.setStatusBarStyle({
            style : 'light',
            color : '#000'
        });
        //
    
    
    
    var c_wisdom_id = api.pageParam.uid;
    var userInfos = {};
	var _data = {
			script: "managers.om.nearby.nearby",
			needTrascation: false,
			funName: "getUserById",
			form: "{uid: '"+c_wisdom_id+"'}"
		};
	    $$.ajax({
			url: rootUrl + "/api/execscript",
			dataType: 'json',
			method: 'post',
			data:_data,
			success: function(data) {
				if(data.datasources[0].rows!=''){
					userInfos.user_age= data.datasources[0].rows[0].age;
					userInfos.user_gender=data.datasources[0].rows[0].gender;
					userInfos.user_level=data.datasources[0].rows[0].level;
					userInfos.uname=data.datasources[0].rows[0].username;
					userInfos.utoken=data.datasources[0].rows[0].c_rong_token;
					userInfos.uimage=data.datasources[0].rows[0].c_user_image;
					userInfos.uimg =data.datasources[0].rows[0].c_user_image;
					userInfos.uid=data.datasources[0].rows[0].uid;
					api.openFrame({
			            name : 'welcome',
			            url : 'welcome.html',
			            rect : {
			                x : 0,
			                y : 20,
			                w : 'auto',
			                h : 'auto'
			            },
			            showProgress : false,
			            bounces : false,
			            pageParam:{userinfo:userInfos}
			        });
			        //
			        uid = userInfos.uid;
			        Auto517.init();
			        Auto517.AndroidReturn.init();
				}
			},
			error: function(data) {
				toast.show("请求失败");
			}
		});
    }
</script>